home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4353 < prev    next >
Encoding:
Text File  |  1996-08-06  |  597 b   |  26 lines

  1. Path: camelot.dsccc.com!not-for-mail
  2. From: kcline@sun132.spd.dsccc.com (Kevin Cline)
  3. Newsgroups: comp.lang.c++
  4. Subject: Sun compiler bug?
  5. Date: 29 Jan 1996 16:07:49 -0600
  6. Organization: DSC Communications Corporation Switch Products Division
  7. Message-ID: <4ejgfl$938@sun132.spd.dsccc.com>
  8. NNTP-Posting-Host: sun132.spd.dsccc.com
  9.  
  10. The Sun version 4 compiler won't compile this:
  11.  
  12.     class X {
  13.       typedef int T;
  14.     };
  15.  
  16.     enum E { T = 0 };
  17.  
  18. It complains:
  19.     "foo.C", line 5: Error: Multiple declaration for T.
  20.  
  21. Is this a bug, or is am I misunderstanding the scoping rules?
  22.  
  23. Thanks.
  24. -- 
  25. Kevin Cline
  26.